public class ConstantPool{
    public static void main(String args[]){
		if(args.length==0) return ;
		System.out.println(System.identityHashCode((args[0]+Integer.toString(0)));//字符串本身
		System.out.println(System.identityHashCode((args[0]+Integer.toString(0)).intern());//常量池引用
		System.gc();
		System.out.println(System.identityHashCode((args[0]+Integer.toString(0)).intern());//回收后的常量池引用
	//三次输出的hash不同
	}
}